﻿class Tree<T>
{
    private T value;
    private Tree<T> parent;
    private Tree<T> leftChild;
    private Tree<T> rightChild;

    public T Value
    {
        get { return this.value; }
        set { this.value = value; }
    }

    public Tree<T> Parent
    {
        get { return parent; }
        set { parent = value; }
    }
    public Tree<T> LeftChild
    {
        get { return leftChild; }
        set { leftChild = value; }
    }
    public Tree<T> RightChild
    {
        get { return rightChild; }
        set { rightChild = value; }
    }
    public Tree(T value)
    {
        this.value = value;
        this.LeftChild = null;
        this.RightChild = null;
        this.parent = null;
    }
}